package util

import "github.com/samuel/go-zookeeper/zk"

var ZkUtil *ZkUtils

type ZkUtils struct {
	Conn *zk.Conn
}

func (z ZkUtils) Exists(path string) bool {
	exists, _, _ := z.Conn.Exists(path)
	return exists
}

func (z ZkUtils) Children(path string) []string {
	paths, _, _ := z.Conn.Children(path)
	return paths
}
